const appid = '83281986'
const appsecret = 'sWGC3SmK'
export const weatherForecast = city => {
    let url = `https://www.tianqiapi.com/free/day?appid=${ appid }&appsecret=${ appsecret }&vue=1`
    city && (url += `&city=${ city }`)
    return fetch( url ).then( text => text.text() ).then( json => JSON.parse( json ))
}